package com.ccys.db.enums;

/**
 * @program: WhiteCoat
 * @description: 国家服务设置详情枚举
 * @author: ZhangJingCan
 * @create: 2023-12-13 14:06
 **/
public enum CountryServiceTypeProfileTypeEnum {

//    Benefits & subscription 的类型
//0:self(retail)
//1:AIA corporate
//2:Direct corporate
//3:AIA Healthshield
//4:Subscription
//7:CDMP
    SELF("Self",0),
    AIA_CORPORATE_INSURANCE("AIA corporate insurance",1),
    AIA_HELTHSHIELD("AIA Healthshield",2),
    CORPORATE_SCHEME("Corporate scheme",3),
    WHITECOAT_TELEHEALTH_FAMILY_PLAN("Whitecoat telehealth family plan",4),
    CDMP_PROGRAMMES("CDMP programmes",7),
    ;

    private String msg;

    private Integer code;

    public static String getMessageByCode(int code) {
        for (CountryServiceTypeProfileTypeEnum value : CountryServiceTypeProfileTypeEnum.values()) {
            if (value.getCode() == code) {
                return value.getMsg();
            }
        }
        throw new IllegalArgumentException("Invalid code: " + code);
    }

    CountryServiceTypeProfileTypeEnum(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
